$(function(){
	
	
	

	
	$(".delete").click(function(){
		if($(this).parent().parent().find('input[type="checkbox"]').attr("checked")){
				var temp = this;
				var url = 'removePhotoFromAlbum';
				var data = {"apId":$(this).find('input').val()};
				$.post(url,
					   data,
					   function(data){
							$.blockUI({ message: $('#deleteFeedBack')  });
							setTimeout(function(){
								$.unblockUI();
								$(temp).parent().parent().remove();
								
							},2000);
				 	    },
					   'html'
				);
				
		}else{
			$.blockUI({ message: $('#deleteCheck')  });
			setTimeout(function(){
			$.unblockUI();
			},2000);
		}
	});
	
	
	
});